To confirm the validity of this conclusion, the following
visualization digs deep into highlighting the top countries with most
cases and most new tests
top10 <- df %>%
group_by(continent) %>%
summarise(m = mean(total_cases, na.rm = TRUE)) %>%
arrange(desc(m)) %>%
top_n(10)
## Selecting by m
tx10 <- semi_join(df, top10, by = "continent")
plot_ly(tx10, x = ~date, y = ~median) %>%
add_lines(linetype = ~location)
## Warning: plotly.js only supports 6 different linetypes
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
## Warning: The following are not valid linetype codes:
## 'NA'
## Valid linetypes include:
## 'solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'
#use the new datasets with fixed latitudes for better map visualization.
new_data <- read.csv("coronavirus.csv")
save(new_data, file = "corona.RData")
head(new_data)
## date province country lat long type cases uid iso2 iso3
## 1 2020-01-22 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## 2 2020-01-23 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## 3 2020-01-24 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## 4 2020-01-25 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## 5 2020-01-26 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## 6 2020-01-27 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN
## code3 combined_key population continent_name continent_code
## 1 124 Alberta, Canada 4413146 North America <NA>
## 2 124 Alberta, Canada 4413146 North America <NA>
## 3 124 Alberta, Canada 4413146 North America <NA>
## 4 124 Alberta, Canada 4413146 North America <NA>
## 5 124 Alberta, Canada 4413146 North America <NA>
## 6 124 Alberta, Canada 4413146 North America <NA>
#get the leading countries in terms of the number of cases confirmed
filtered_df <- new_data %>%
filter(type == "confirmed") %>%
group_by(country) %>%
summarise(sum_Cases = sum(cases)) %>%
arrange(-sum_Cases)%>%
top_n(10) #order the total in ascending order
## Selecting by sum_Cases
plt <- ggplot(filtered_df, aes(x = country, y=sum_Cases)) + geom_bar(stat="identity", fill="steelblue")+
theme_minimal()
ggplotly(plt)